﻿using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using MVVMLightDemo.Data;
using MVVMLightDemo.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace MVVMLightDemo.ViewModel
{
    public class TreeViewModel:ViewModelBase
    {
        public RelayCommand SelectedChangedCommand { get; set; }

        private List<TreeModel> treeInfo;

        public List<TreeModel> TreeInfo
        {
            get { return treeInfo; }
            set
            {
                treeInfo = value;
                this.RaisePropertyChanged("TreeInfo");
            }
        }

        public TreeViewModel()
        {
            this.TreeInfo = DataProvider.GetTreeInfo();
            SelectedChangedCommand = new RelayCommand(() => 
            {
                MessageBox.Show("切换了。。");
            });
        }


    }
}
